{include file="header.tpl"}

{if $catalog_id != ''}
<p><a href="thongtin_add.php?catalog_id={$catalog_id}">Add thong tin</a></p>
{/if}
<select onchange="list_catalog(this.value)">

<option>Chon Catalog</option>
{foreach from=$data_catalog item=item}
{if $item.id == $smarty.get.catalog_id}
<option value="{$item.id}" selected="selected">{$item.name}</option>
{else}
<option value="{$item.id}" >{$item.name}</option>
{/if}
{/foreach}
</select>
<div>
<ol>
{foreach from=$data_thongtin item=item}
<li>
{$item.title}
{$item.sabo} <a href='thongtin_edit.php?catalog_id={$catalog_id}&thongtin_id={$item.id}'>Edit</a>
| <a href="javascript:askdelete({$item.id},{$catalog_id})">Delete</a>
<br />
</li>

{/foreach}

</ol>
</div>

{literal}

<script src="../data/javascript/javascript.js" type="text/javascript">//lay duoc hotel_id <-- tinh tu file article/view -->
</script>
<script type="text/javascript">

function askdelete(id,catalog_id)
{
	if (confirm('Bạn thật sự muốn xóa')){
		window.location = "thongtin_delete.php?thongtin_id=" + id + "&catalog_id=" + catalog_id;
	}
}
</script>
{/literal}


{include file="footer.tpl"}